package dao

import "gorm.io/gorm"

type HomeSwiper struct{}

func (h *HomeSwiper) GetSwiperList(origin int, db *gorm.DB) func(db *gorm.DB) *gorm.DB {
	return func(db *gorm.DB) *gorm.DB {
		if origin == -1 {
			return db
		} else {
			return db.Where("origin = ?", origin)
		}
	}
}

var HomeSwiperDao = new(HomeSwiper)
